home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug232 / env.h < prev    next >
Text File  |  1987-06-17  |  6KB  |  181 lines

  1. /*
  2.     Little Smalltalk
  3.  
  4.     execution environment definitions.
  5.  
  6. The Little Smalltalk system is tailored to various machines by
  7. changing defined constants.  These constants, and their meanings,
  8. are as follows:
  9.  
  10. CURSES    defined if the curses(3) library is available and the primitive
  11.     graphics it provides is desired
  12.  
  13. GAMMA    defined if gamma() is part of the math library
  14.  
  15. ENVSAVE    defined if it is required to save environ during fast load
  16.  
  17. FACTMAX    maximum integer value for which a factorial can be computed by
  18.     repeated multiplication without overflow.
  19.  
  20. FASTDEFAULT    defined if the default behavior should be to do a fast load
  21.  
  22. FLUSHREQ    if defined a fflush is given after every call to printf
  23.         or fprintf
  24.  
  25. INLINE    generate inline code for increments or decrements -
  26.     produces larger, but faster, code.
  27.  
  28. MDWINDOWS    defined if the maryland windows package is used
  29.  
  30. NOSYSTEM    defined if the system() call is NOT provided
  31.         (seriously limits functionality)
  32.  
  33. OPEN3ARG    defined if 3 argument style opens are used
  34.  
  35. PLOT3    defined if you have a device for which the plot(3) routines work
  36.     directly on the terminal (without a filter)
  37.     provides many of these routines as primitive operations
  38.     (see class PEN in /prelude)
  39.  
  40. SMALLDATA    if defined various means are used to reduce the size of the
  41.         data segment, at the expense of some functionality.
  42.  
  43. SIGS        define in the signal system call is available
  44.         for trapping user interrupt signals
  45.  
  46. SETJUMP        defined if the setjump facility is available
  47.  
  48.     In addition to defining constants, the identifier type ``unsigned
  49. character'' needs to be defined.  Bytecodes are stored using this datatype.
  50. On machines which do not support this datatype directly, macros need to be
  51. defined that convert normal chars into unsigned chars.  unsigned chars are
  52. defined by a typedef for ``uchar'' and a pair of macros that convert an int
  53. into a uchar and vice-versa.
  54.  
  55.     In order to simplify installation on systems to which the
  56. Little Smalltalk system has already been ported, various ``meta-defines''
  57. are recognized.  By defining one of these symbols, the correct definitions
  58. for other symbols will automatically be generated.  The currently
  59. recognized meta-defines are as follows:
  60.     
  61. BERK42    Vax Berkeley 4.2
  62. DECPRO    Dec Professional 350 running Venix
  63. HP9000    Hewlett Packard 9000
  64. PDP1170    PdP 11/70 (also other PDP 11 machines)
  65. PERKELM    Perken Elmer 8/32
  66. RIDGE    Ridge ROS 3.1
  67.  
  68.     Finally, a few path names have to be compiled into the code.
  69. These path names are the following:
  70.  
  71. TEMPFILE - a temporary file name in mktemp format
  72. PARSER - the location of the parser
  73. PRELUDE - the location of the standard prelude in ascii format
  74. FAST - the location of the standard prelude in saved format
  75. LIBLOC - the location of the directory for additional libraries
  76.  
  77. */
  78.  
  79. # define TEMPFILE "/usr/tmp/stXXXXXX"
  80. # define PARSER   "/users/budd/Projects/smalltalk/bin/parse"
  81. # define PRELUDE  "/users/budd/Projects/smalltalk/prelude/standard"
  82. # define FAST     "/users/budd/Projects/smalltalk/prelude/stdsave"
  83. # define LIBLOC      "/users/budd/Projects/smalltalk/prelude"
  84.  
  85. /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>meta-define <<<<<<<<<<<<<<<*/
  86.  
  87. # define BERK42
  88.  
  89. /*------------------------------  VAX Berkeley 4.2 definition */
  90. # ifdef BERK42
  91.  
  92. # define GAMMA        /* gamma value is known */
  93. # define FACTMAX 12
  94. # define FLUSHREQ    /* flush after every printf */
  95. # define SIGS
  96. # define SETJUMP
  97. typedef unsigned char uchar;
  98. # define itouc(x) ((uchar) x)
  99. # define uctoi(x) ((int) x)
  100. /* # define MDWINDOWS */
  101. /* FASTLOADING DOES work, and should eventually be defined to be standard*/
  102. /*# define FASTDEFAULT*/    /* default to fast-loading */
  103.  
  104. # endif        /* BERK42 definition */
  105.  
  106. /*------------------------------  HP 9000 / HP - UX definition */
  107. # ifdef HP9000
  108.  
  109. # define GAMMA        /* gamma value is known */
  110. # define FACTMAX 12
  111. # define FLUSHREQ    /* flush after every printf */
  112. # define SIGS
  113. # define SETJUMP
  114. typedef unsigned char uchar;
  115. # define itouc(x) ((uchar) x)
  116. # define uctoi(x) ((int) x)
  117.  
  118. # endif        /* HP 9000 definition */
  119.  
  120. /* ---------------------------------------RIDGE ROS 3.1 definition */
  121. # ifdef RIDGE
  122.  
  123. # define GAMMA        /* gamma value is known */
  124. # define FACTMAX 12
  125. typedef unsigned char uchar;
  126. # define itouc(x) ((uchar) x)
  127. # define uctoi(x) ((int) x)
  128.  
  129. # endif        /* RIDGE definition */
  130.  
  131. /* --------------------------------------------DEC PRO definitions */
  132. # ifdef DECPRO
  133.  
  134. /* GAMMA, OPEN3ARG not defined */
  135. # define ENVSAVE
  136. # define FACTMAX 8
  137. # define SMALLDATA
  138. /* unsigned characters not supported, but can be simulated */
  139. typedef char uchar;
  140. # define itouc(x) ((uchar) x)
  141. # define uctoi(x) (unsigned) (x >= 0 ? x : x + 256)
  142.  
  143. # endif        /* DECPRO definition */
  144.  
  145. /* --------------------------------------------PDP11/70 definitions */
  146. # ifdef PDP1170
  147.  
  148. /* GAMMA, OPEN3ARG not defined */
  149. # define ENVSAVE
  150. # define FACTMAX 8
  151. # define FLUSHREQ
  152. # define SIGS
  153. # define SETJUMP
  154. /* unsigned characters not supported, but can be simulated */
  155. typedef char uchar;
  156. # define itouc(x) ((uchar) x)
  157. # define uctoi(x) (unsigned) (x >= 0 ? x : x + 256)
  158.  
  159. # endif        /* PDP1170 definition */
  160.  
  161. /*------------------------------  Perkin Elmer 8/32 definitions */
  162. # ifdef PERKELM
  163.  
  164. # define ENVSAVE
  165. # define FACTMAX 12
  166. # define FLUSHREQ    /* flush after every printf */
  167. typedef unsigned char uchar;
  168. # define itouc(x) ((uchar) x)
  169. # define uctoi(x) ((int) x)
  170.  
  171. # endif        /* PERKELM definition */
  172.  
  173. /******************************************************************/
  174. /*
  175.     the following are pretty much independent of any system
  176. */
  177.  
  178. # define INLINE        /* produce in line code for incs and decs */
  179. /* # define CURSES    */
  180. /* # define PLOT3     */
  181.